package com.example.qwen03;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        System.out.println("配置类在运行");
        registry.addResourceHandler("/photos/**")
                .addResourceLocations("file:E:\\lindada\\文件夹\\大三下\\东软实训\\AI\\photos\\");
    }
}
